package com.leetcode.LC_MED;

import java.util.ArrayList;

public class LC538_3 {
    int num = 0;

    private TreeNode convertBST(TreeNode root) {
        if (root != null) {
            convertBST(root.right);
            root.val += num;
            num = root.val;
            convertBST(root.left);
            return root;
        }
        return null;
    }

    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();

    }
}
